#ifndef _ERROR_H_
#define _ERROR_H_

#include "global.h"

extern Bool QUIET;

extern int error_count;               // Count the number of errors.
extern int warning_count;             // Count the number of warnings.
extern char reset_char[];             // trying to make parser recover from errors by skipping.

// Print error message, its reference message, and the char to skip to.
extern void print_error(char *err_msg, char *ref_msg, char *skp_str);
// Print warning message, its reference message.
extern void print_warning(char *warn_msg, char *ref_msg);
// Print fatal message and exit.
extern void print_fatal();
// parse.c
// "Compiler is expecting an IDENT."
// "Identifier's type must be INT, FLOAT, or CHAR."
// "Unexpected character."
// "Unrecognized declaration."
// "Compiler is expecting an SEMICOLON token."
// "Compiler is expecting an ASSIGN token."
// "Compiler is expecting a valid constant value for the const declaration"
// "Compiler is expecting an LPAREN."
// "Compiler is expecting an RPAREN."
// "Compiler is expecting an L_CURLY_BRACE."
// "Compiler is expecting an R_CURLY_BRACE."
// "Identifier is not supposed to be constant at the left side of an assignment."
// "Unrecognized identifier, it is neither a function nor a variable."
// "Error encountered while trying to indentify a factor: Expected token didn't appear."
//// "Can't find the specified identifier in current scope."
// "Compiler is expecting an ADDITIVE_OP."
// "Compiler is expecting an C_INT."
// "Scope unmatch."
// "Function call within a factor must return a value."
// "Function must return a value."

// la.c
// "Expecting a printable character."
// "Expecting a PLUS, MINUS, ALPHABET, or NUMBER"
// "Illegal character was encountered."
// "Leading zero within FLOAT and INT is not allowed."
//// "Error encountered, Lexer is trying to skip."
// "Length of the token is so long so that it will be trimmed out."

// table.c
// "Already declared a identifier with the same name in the same scope."
// "Already declared a function with the same name in the same scope."
//// "Variable is never used."
//// "Function is never called."

#endif
